﻿@model IEnumerable<SoftHotel.Models.Consumo>

@{
    ViewBag.Title = "IndexEvent";
}

<h2>Consumos de Eventos</h2>
<br />
    @using (Html.BeginForm("Create", "Consumo", new { tipo = "E" }, FormMethod.Get))
    {<table id="MainContent_Table3" rules="all" style="background-color: #BDBDBD; width: 900px; margin-bottom: 0px;" border="0">
	<tbody><tr><td>
    <input type="submit" name="nuevo" value="Nuevo" />
     </td></tr></tbody></table>
    }
<br />
<table width="100%" rules="all" border="1" style="border-color: Black; width: 900px; margin-bottom: 0px;">
      <tr align="center">
        <th>
            Cliente
        </th>
        <th>
            Nº Reserva
        </th>
        <th>
            Ambiente
        </th>
        <th>
            Servicio
        </th>
        <th>
            Cantidad
        </th>
        <th>
            Moneda
        </th>
        <th>
            Precio
        </th>
        <th>
            Monto Total
        </th>
        <th>
            Fecha
        </th>
        <th>
            Estado
        </th>
    </tr>

@foreach (var item in Model) {
    <tr align="center">
        <td>
            @Html.ActionLink(@item.nombreCliente, "Details", new { id = @item.idConsumo }, FormMethod.Post)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.numeroReserva)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.nombreAmbiente)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.servicio.nombre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.cantidad)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.moneda)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.monto)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.montoTotal)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.fecha)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.nombreEstado)
        </td>
        <td>
          <div  style="float:left">
            @using (Html.BeginForm("Edit", "Consumo", new { id = item.idConsumo }, FormMethod.Get))
            {  <input type="image"  alt="0" title="Editar"  src="/Content/Images/edit.jpg" />
            }
        </div><div  style="float:right">
            @using (Html.BeginForm("Delete", "Consumo", new { id = item.idConsumo }, FormMethod.Get))
            {  <input type="image"  alt="0" title="Eliminar" src="/Content/Images/delete.jpg" />
            }
        </div>        </td>
    </tr>
}

</table>

